package pengwk.controller;


import com.alibaba.fastjson.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import pengwk.pojo.PWKPojo;
import pengwk.service.PWKservice;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class PengwkController {
    @Resource
    PWKservice pWKservice;

    @RequestMapping("hello")
    @ResponseBody
    public String hello(){
        List<PWKPojo> list=pWKservice.hello();
        return JSONArray.toJSONString(list);
    }
}
